package com.cyy.demo.bussiness;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

@Component
public class RedisService {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;


    public void publish(String topicName,String value){
        stringRedisTemplate.convertAndSend(topicName,value);
    }

}
